import { defineConfig } from 'vitepress'
import nav from './configs/nav'
import sidebar from './configs/sidebar'
import footer from './configs/footer'
import {DefaultTheme, UserConfig} from "vitepress/dist/node";
import website, { docsConfig } from "../../config/website";

export default defineConfig({
  title: 'mg-ui',
  description: '',
  appearance: false,
  base: docsConfig.base,
  outDir: docsConfig.outDir,
  head: [
    [
      'link',
      {
        rel: 'icon',
        href: '/images/logo.png'
      }
    ]
  ],
  themeConfig: {
    siteTitle: website.title,
    logo: '/images/logo.png',
    nav,
    sidebar,
    footer,
    docFooter: {
      prev: '上一页',
      next: '下一页'
    },
    search: {
      provider: 'local',
      options: {
        locales: {
          zh: {
            translations: {
              button: {
                buttonText: '搜索文档',
                buttonAriaLabel: '搜索文档'
              },
              modal: {
                noResultsText: '无法找到相关结果',
                resetButtonTitle: '清除查询条件',
                footer: {
                  selectText: '选择',
                  navigateText: '切换'
                }
              }
            }
          }
        }
      }
    }
  }
} as UserConfig<DefaultTheme.Config>)
